package com.hp.service.impl;

import com.hp.entity.Patient;
import com.hp.mapper.PatientMapper;
import com.hp.service.PatientService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PatientServiceImpl implements PatientService {
    @Resource
    private PatientMapper patientMapper;

    @Override
    public int add(Patient patient) {
        return patientMapper.add(patient);
    }

    @Override
    public int delete(String[] id) {
        return patientMapper.delete(id);
    }

    @Override
    public List<Patient> findAll(Patient patient) {
        return patientMapper.findAll(patient);
    }

    @Override
    public int update(Patient patient) {
        return patientMapper.update(patient);
    }

    @Override
    public Patient findById(Patient patient) {
        return patientMapper.findById(patient);
    }

    @Override
    public int addIdCadr(Patient patient) {
        return patientMapper.addIdCadr(patient);
    }

    @Override
    public Patient findByIdAll(Patient patient) {
        return patientMapper.findByIdAll(patient);
    }

    @Override
    public List<Patient> selectDan(String email) {
        return patientMapper.selectDan(email);
    }
}
